<div class="popup_guibai2 popup_detail popup_xemtruoc_photo" style="display:none ;">
            <div class="main_popup slider xemtruoc">
                <div class="detail_popup">
					<div class="left_popup">
						<div class="content_popup">
                            <div class="photo_or_video">
                                <?php if($contesttmp[0]->type == "photo"){ 
                                $list_photo = $this->model->get_list_image_contest_tmp($contesttmp[0]->id);  
                              
                                ?>
                                    <div id="mycarousel" class="img_slider jcarousel-skin-tango">
        								<div class="jcarousel-control">
                                        <?php  if ($list_photo) {
                                             $i = 1;
                                             foreach ($list_photo as $k ) { ?>
                                            <a href="#" class="<?=$i?>"></a>
                   
                                        <?php $i++;}}?>
                                        </div>
        								<ul>
        									 <?php  if ($list_photo) {
                                             foreach ($list_photo as $k ) {
                                            ?>
        									<li><img src="<?=PATH_URL.'static/images/tim/timthumb.php?src='.PATH_URL.DIR_UPLOAD_IMAGE.$k->image.'&amp;w=640&amp;h=427&amp;zc=0&amp;q=100'?>" alt="" /></li>
        								    <?php }}?>
        								</ul>
							         </div>
                                <?php }else{ ?>
                                    <div  style="height: 427px;width: 640; display: block;">
                                     <div id="video"></div>
                                    </div>
                                   
                                        <script type="text/javascript">
                                            var link ="<?php  if($contesttmp[0]->type == 'youtube'){echo $contesttmp[0]->file ;}else{echo PATH_URL .'static/uploads/contest/video/'.$contesttmp[0]->file ;}?>";
               
                                            var type = '<?=$contesttmp[0]->type?>' ;
                                            var flashvars = {linkVideo:link,type:type };
                                            swfobject.embedSWF(root+'static/flash/videoplayer.swf', 'video', '640', '427', '9.0.45', root+'/swfobject/expressinstall.swf', flashvars, {base:root + "static/flash/",bgcolor: '#CCCCCC', menu: 'false',allowFullScreen:'true', wmode:'transparent'});
                                        </script>
                                    
                                <?php } ?>
                            	
                            </div>
						
							<div class="text_popup_slider">
								<div class="title mt10"><?=$contesttmp[0]->title?></div>
								<div class="mt5 c_ffffff"><?= Cuttext( $contesttmp[0]->content,80)?></div>
								<div class="date_binhchon mt13">
									<div class="btn_dangbai"><a href="JavaScript:void(0);" onclick="return post_contest_video_photo();" class="btn_hoantat"></a><a href="JavaScript:void(0);" onclick="close_popup()" class="btn_sualaibai"></a><a href="JavaScript:void(0);" class="btn_huy" onclick="close_popup_preview()"></a><div class="clearAll"></div></div>
								</div>
								<div style="height: 10px;"></div>
							</div>
						</div>
					</div>
					<div class="clearAll"></div>
				</div>
            </div> 
        </div>
        <script type="text/javascript">
        
         function post_contest_video_photo()
            {
                var url ="<?= PATH_URL ?>contest/ajax_post_photo";
                $.post(url,{
                    id:<?=$contesttmp[0]->id?>
                },function(data){
                    if(data==1)
                    {
                        open_Popup_thanhcong('contest');
                        close_Popup_Post_ContestHoanThanh();
                        $(".popup_xemtruoc_photo").overlay().close();
                    }
                    if(data == 0)
                    {
                        
                    }
                });
            }
		function close_popup_preview()
		{
			 $(".popup_xemtruoc_photo").overlay().close();
            close_Popup_Preview();
		}
		
         function close_popup()
         {
            $(".popup_xemtruoc_photo").overlay().close();
            close_Popup();
         }
        </script>